#ifndef	__HTTPUTIL_H__
#define	__HTTPUTIL_H__
#include "stm32f10x.h"
#include "http_server.h"

#define HW_VERSION "WL003"
#define FW_VERSION "TY012"
#define WSBUF_SIZE      512

#define INIT        0
#define FAILED      1
#define SUCCEED     2

void proc_http(SOCKET s, u_char * buf);
void do_https(void);
void make_cgi_response(uint8 num,uint8* url,int8* cgi_response_buf,uint8* html,uint8* Prompt);
uint8 cgi_loginconfig(st_http_request *http_request);
uint8 cgi_systeminfoconfig(st_http_request *http_request);
uint8 cgi_usermodconfig(st_http_request *http_request);
uint16 network_model(uint8 *mode,uint8 data[]);
uint8 cgi_networkparameterconfig(st_http_request *http_request);
uint16_t cgi_cameramanagementconfig(st_http_request *http_request);
uint16 authentication(uint8 *mode,uint8 data[]);
uint8 cgi_safetymanagementconfig(st_http_request *http_request);
uint16 html_port_power_supply_mode(uint8 sport,uint8 mode,uint8 data[]);
uint8 cgi_powersupplymodeconfig(st_http_request *http_request);
uint8 cgi_caliconfig(st_http_request *http_request);
uint16 html_port_mapping_table_add_tr_td1(uint8 sport,uint8 mode,uint8 dport,uint8 data[]);
uint16 html_port_mapping_table_add_tr_td2(uint8 sport,uint8 mode,uint8 dport,uint8 data[]);
uint16 html_port_mapping_table_add_tr_td3(uint8 sport,uint8 mode,uint8 dport,uint8 data[]);
uint16 dhcp_model(uint8 *mode,uint8 data[]);
uint16 ping_mode(uint8 mode,uint8 data[]);
#endif


